﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using ProjectCom;

/// <summary>
/// TSqlDBItem 的摘要说明
/// </summary>
public class SqlBean
{
    #region 属性
    private string _Project_Code;
    public string Project_Code
    {
        set
        {
            _Project_Code = value;
        }
        get
        {
            return _Project_Code;
        }
    }
    #endregion


    #region 方法
    public DataTable SelectiYusanID(string strSelect, string iYusanID)
    {
        string strSql = "select 1 from 11 where ";
        return Sql_zr.ExecuteDataTable(strSql);
    }

    public DataTable SelectiYusanPID(string strSelect, string iYusanPID)
    {
        string strSql = "select 1 from 11 where ";
        return Sql_zr.ExecuteDataTable(strSql);
    }


    //public DataTable SelectiYusanID(string iYusanID) { }
    //public DataTable SelectiYusanPID(string iYusanPID) { }



    public int Update()
    {
        string strSql = "";
        return Sql_zr.ExecuteNonQuery(strSql);
    }


    //public bool Update(string strColumn, string strValue) { }
    //public bool Update(Hashtable hashtable) { }

    public int DeleteiYusanID(string iYusanID)
    {
        string strSql = "delete from 11 where 1=1";
        return Sql_zr.ExecuteNonQuery(strSql);
    }
    public int Delete(string iYusanPID)
    {
        string strSql = "delete from 11 where 1=1";
        return Sql_zr.ExecuteNonQuery(strSql);
    }

    public bool Insert()
    {
        string strSql = "insert into 11 (2,3) values('2',3)";
        if (Sql_zr.ExecuteNonQuery(strSql) != 1)
        {
            return false;
        }
        else
        {
            return true;
        }

    }

    public int Countwhere()
    {
        string strSql = "select count(1) from 11 where 1=1";
        return (int)Sql_zr.ExecuteScalar(strSql);
    }

    public int Count()
    {
        string strSql = "select count(*) from 11";
        return (int)Sql_zr.ExecuteScalar(strSql);
    }

    public DataTable Select()
    {
        string strSql = "select * from 11";
        return Sql_zr.ExecuteDataTable(strSql);
    }

    #endregion


}
